#include <QPushButton>
#include "helper.h"
#include "QLabel"
#include <qfont.h>

helper::helper(QWidget *parent) : QWidget(parent) {
    this->setWindowTitle("帮助");
    this->resize(1200, 600);
    QFont op_font, ans_font;
    op_font.setPointSize(16);
    ans_font.setPointSize(15);
    QLabel *op_1 = new QLabel("左键单击方块：", this);
    QLabel *op_2 = new QLabel("右键双击方块：", this);
    QLabel *op_3 = new QLabel("右键双击数字：", this);
    op_1->move(50, 100);
    op_1->setFont(op_font);
    op_2->move(50, 230);
    op_2->setFont(op_font);
    op_3->move(50, 360);
    op_3->setFont(op_font);
    QLabel *ans_1 = new QLabel("挖开方块，如果是雷则游戏结束", this);
    QLabel *ans_2 = new QLabel("标记/取消标记", this);
    QLabel *ans_3 = new QLabel("如果周围标记了等量的方块，\n直接挖开周围剩余的方块", this);
    ans_1->move(400, 100);
    ans_1->setFont(ans_font);
    ans_2->move(400, 230);
    ans_2->setFont(ans_font);
    ans_3->move(400, 360);
    ans_3->setFont(ans_font);
    QPushButton *back = new QPushButton("返   回", this);
    back->resize(150, 60);
    back->move(this->width() * 0.8, this->height() * 0.8);
    connect(back, &QPushButton::clicked, [=]() {
        this->close();
    });
}
